﻿<%@ Page Language="C#" MasterPageFile="~/manage/MasterPage.master" AutoEventWireup="true" CodeFile="QuanLyThongTinQuangCao.aspx.cs" Inherits="manage_Default2" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="phContent" Runat="Server">
<form id="Form1" runat="server" action="">
        <h3 style="text-align:center">Quản lý thông tin quảng cáo</h3>
        <asp:GridView runat="server" ID="grdUser" DataKeyNames="ID" AutoGenerateColumns="False" 
                      AllowPaging="True" OnPageIndexChanging="grdUser_PageIndexChanging" 
                      Height="250px" HorizontalAlign="Center"  OnRowCommand="grdUser_RowCommand" CellPadding="4" ForeColor="#333333" GridLines="None" >
             <Columns>
                  <asp:TemplateField HeaderText="T&#234;n">
                    <ItemTemplate> 
                        <asp:Label ID="lblten" runat="server" Text='<%# Bind("name") %>'></asp:Label> 
                    </ItemTemplate>
                     <HeaderStyle HorizontalAlign="Left" />
                  </asp:TemplateField>
                  <asp:TemplateField HeaderText="L&#244; g&#244;">
                    <ItemTemplate> 
                        <asp:Label ID="lblLogo" runat="server" Text='<%# Bind("image_url") %>'></asp:Label> 
                    </ItemTemplate>
                     <HeaderStyle HorizontalAlign="Left" />
                  </asp:TemplateField>
                  <asp:TemplateField HeaderText="Link Logo">
                    <ItemTemplate> 
                        <asp:Label ID="lblDicChi" runat="server" Text='<%# Bind("url") %>'></asp:Label> 
                    </ItemTemplate>
                     <HeaderStyle HorizontalAlign="Left" />
                  </asp:TemplateField>
                  <asp:TemplateField HeaderText="Địa chỉ">
                    <ItemTemplate> 
                        <asp:Label ID="lblDiaChi" runat="server" Text='<%# Bind("address") %>'></asp:Label> 
                    </ItemTemplate>
                     <HeaderStyle HorizontalAlign="Left" Width="70px"/>
                  </asp:TemplateField>  
                  <asp:TemplateField HeaderText="Th&#244;ng Tin">
                    <ItemTemplate> 
                        <asp:Label ID="lblThongTin" runat="server" Text='<%# Bind("information") %>'></asp:Label> 
                    </ItemTemplate>
                     <HeaderStyle HorizontalAlign="Left" Width="70px"/>
                  </asp:TemplateField> 
                 <asp:TemplateField HeaderText="Số Điện Thoại">
                 <ItemTemplate> 
                        <asp:Label ID="lblSoDienThoai" runat="server" Text='<%# Bind("phone_number") %>'></asp:Label> 
                    </ItemTemplate>
                 </asp:TemplateField>
                  <asp:TemplateField HeaderText="T&#236;nh Trạng">                    
                    <ItemTemplate>                                                     
                        <asp:LinkButton ID="lnkTinhTrang" CommandName="Active" CommandArgument='<%#Eval("ID") %>' runat="server" Text='<%# Bind("isDelete") %>'></asp:LinkButton>                     
                    </ItemTemplate>                    
                    <ControlStyle CssClass="center"/>                   
                  </asp:TemplateField>        
                  <asp:TemplateField HeaderText="X&#243;a">
                    <ItemTemplate>
                        <asp:LinkButton ID="lnkDelete" CommandName='Xoá' OnClientClick="return confirm('Bạn có chắc muốn xóa thông tin quảng cáo này không ?')" CommandArgument='<%#Eval("ID")%>' runat="server">Xoá</asp:LinkButton>
                    </ItemTemplate>                   
                  </asp:TemplateField> 
                  <asp:TemplateField HeaderText="Sửa">
                    <ItemTemplate>
                        <a href="./CapNhatQuangCao.aspx?id=<%#Eval("ID")%>" >Sửa</a>
                    </ItemTemplate>                   
                  </asp:TemplateField>                                 
             </Columns>
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <RowStyle BackColor="#EFF3FB" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <EditRowStyle BackColor="#2461BF" />
            <AlternatingRowStyle BackColor="White" />
        </asp:GridView>        
    </form>  
</asp:Content>

